package com.yiren.dbaa.module.exam.api;

import com.yiren.backstage.currency.bean.VoiceBean;
import com.yiren.backstage.currency.entity.GradeStandardEntity;
import com.yiren.backstage.currency.entity.LineInfoEntity;
import com.yiren.backstage.player.api.IPlayerCallBack;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Describe 考试页面评分相关接口
 *
 * @author WRX
 * @date 2022/7/19
 */
public interface IExamGradeApi {

    /**
     * 获取人工评判集合
     */
    List<GradeStandardEntity> getArtificialJudges();

    /**
     * 播报实时扣分语音
     */
    void playGradeVoice(Map<String, GradeStandardEntity> realtimeVoices, OnPlayCompleteListener listener);

    /**
     * 添加评分语音
     */
    List<VoiceBean> addGradeVoice(GradeStandardEntity gradeStandardEntity);

    /**
     * 播报开始考试语音
     */
    void playStartExamVoice(LineInfoEntity lineInfo, IPlayerCallBack iPlayerCallBack);

    /**
     * 结束考试播报成绩
     */
    void endExamPlayScore(int totalScore, Map<String, GradeStandardEntity> gradeVoices, boolean isAutoPlay);

    /**
     * 获取项目评分
     */
    int getProjectGrade(HashMap<String, Integer> projectCodeMap, GradeStandardEntity gradeStandardEntity);

    /**
     * 重新计算扣分项目以及所扣分数
     */
    void resetProjectCode(GradeStandardEntity gradeStandardEntity, HashMap<String, Integer> projectCodeMap);
}
